:root {
  // --primary-color: #536dfe;
  --Table-thead-bg: #f5f7f9;
  --Page-body-padding: 15px;
  
  // --button-primary-default-bg-color: var(--primary-color);
  // --button-link-default-font-color: var(--primary-color);
  // --button-primary-hover-bg-color: #485afc;
  // --Table-onHover-bg: #e7e9fc;
  --Table-color: #606266;
  --Table-thead-borderColor: rgba(255, 255, 255, 0.2);
  --body-color: #606266;
  --Form-item-gap: 1rem !important;
  --collapse-default-content-fontSize: 16px !important;
  --Tree-max-height:800vh!important;;
  --Tree-itemHeight:30px!important;;
  --Tree-item-onChekced-bg:rgba(83,109,254,0.5)!important;
}

#renderBox{
  // padding: 15px;
}
.amis-scope .cxd-Video {
  min-width: 120px!important;
}
.amis-renderer {
  flex: 1;
  display: flex;
}

.vue-react-container {
  flex: 1;
}

// 左侧菜单栏样式覆盖
.renderer-page {
  background: #f7f7fb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  .cxd-Form-item {
    margin-bottom: 1.1rem;
  }

  // height: 100vh;
  .cxd-Layout-header {
    box-shadow: 0 0 1px #888;

    .cxd-Layout-headerBar {
      background: var(--header-bg) !important;
      position: relative;
      z-index: 3;
      margin-left: 210px;
    }

    .cxd-Layout-brandBar {
      background: #fff;
      width: 210px !important;

      .cxd-Layout-brand {
        // color: #686aff;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .cxd-AppLogo {
        height: 32px;
      }
    }
  }

  .cxd-AsideNav-subList {
    background: #fff;
  }

  .cxd-Layout--asideFixed .cxd-Layout-aside:before {
    box-shadow: 0 0 1px #888;
  }

  .cxd-Layout--folded .cxd-Layout-aside,
  .cxd-Layout--folded .cxd-Layout-brandBar {
    width: 50px !important;
  }

  .cxd-Layout--folded.cxd-Layout--withAside .cxd-Layout-headerBar,
  .cxd-Layout--folded.cxd-Layout--withAside .cxd-Layout-footer {
    margin-left: 0;
  }

  .cxd-Layout-aside {
    width: 210px;
    // background: linear-gradient(to right, #243949 0%, #517fa4 100%);
    background: #fff;

    .cxd-AsideNav-item {
      margin: 0.5em 0.8em 0 0.8em;

      .cxd-AsideNav-subList {
        .cxd-AsideNav-item>a {
          padding-left: 30px;
        }
      }

      .cxd-AsideNav-itemLabel {
        font-size: 14px;
      }
    }
  }

  .cxd-Layout--folded .cxd-AsideNav-list>.cxd-AsideNav-item>a {
    width: 40px;
    margin-left: -6px;
  }

  .cxd-Layout-content {
    .cxd-AppBcn {
      display: none;
      height: 2.2rem;
      line-height: 2.2rem;
      // font-size: 14px;
      font-weight: 700;
      background: #fff;
    }

    .cxd-AppBody {
      background: #f7f7fb;
      border-radius: 0px;

      .cxd-Page {
        border-radius: 0px;
        background: transparent;
      }
    }
  }

  .cxd-AsideNav-item.is-active>a {
    background: var(--primary-color) !important;
    border-radius: 3px;
    color: #fff;
    word-break: keep-all;
  }

  .cxd-AsideNav-item a {
    color: #333;
    padding: 11px 20px !important;
    word-break: keep-all;
  }

  .cxd-AsideNav-item.is-active>a:hover {
    background: var(--primary-color) !important;
    border-radius: 3px;
    color: #fff;
  }

  .cxd-AsideNav-item.is-open>a>.cxd-AsideNav-itemArrow:empty:before {}

  .cxd-AsideNav-itemArrow:empty:before {
    background: url('http://218.4.170.234:8081/group1/M00/02/D5/rBIAAWWM3_aABUEDAAAEDUTzHbY600.png');
    background-size: 100% 100%;
    font-size: 18px;
  }

  .cxd-AsideNav-item a:hover {
    background: transparent;
    color: var(--primary-color);
  }
}

// 按钮组按钮样式覆盖
.cxd-ButtonGroup .cxd-Button+.cxd-Button {
  border: none !important;
  border-radius: 2px;
  margin-right: 10px;

  .cxd-ButtonGroup-button--active {
    border-radius: 2px;
  }
 
}
.cxd-Button--size-sm{
  font-size: 14px!important;
}
.cxd-ButtonGroup>.cxd-Button:not(:last-child) {
  border: none;
  margin-right: 10px;
  border-radius: 2px;
}

.cxd-ButtonGroup>.cxd-Button:not(:last-child):hover {
  border: none;
}

.cxd-Button--default:not(:disabled):not(.is-disabled):hover:active {
  border: none;
}

.cxd-ButtonGroup-button--active {
  border: none;
}

@mixin page-section {
  background-color: #fff;
  border-radius: 0px;
  padding: 15px;
}

@mixin query-form {
  
  @include page-section();
}

// page 样式
.cxd-Page {
  .cxd-Page-content {
    // background-color: #f5f7f9;
    .cxd-Page-main{
      background-color: #f5f7f9;
    }
    .cxd-Page-body {
      // padding-top: 0;
      // 注意：只修改页面第一层的tab
     padding: 0;
      &>.cxd-Tabs {
        .cxd-Tabs-links {
          
          background-color: #fff;
          padding: 15px;
          padding-bottom: 0;
          border-top-left-radius: 8px;
          border-top-right-radius: 8px;
          border-bottom: 1px solid #dae0e8;
        }

        .cxd-Tabs-content {
          background-color: transparent;
          
          .cxd-Tabs-pane {
            padding: 0;

            &>.cxd-Crud {
              &>.cxd-Form {
                border-top-left-radius: 0;
                border-top-right-radius: 0;
              }
            }

            &>.cxd-Crud2 {
              &>.cxd-Crud2-filter {
                border-top-left-radius: 0;
                border-top-right-radius: 0;

                .cxd-Panel--form {
                  margin-bottom: 0;
                }
              }
            }
          }
        }
      }

      &>.cxd-Form {
        @include query-form;
      }

      &>.cxd-Crud2,
      &>.cxd-Service>.cxd-Crud2 {
        &>.cxd-Crud2-filter {
          .cxd-Panel--form {
            margin-bottom: 0;
          }
        }
      }
    }
  }
}

// CRUD 样式
.cxd-Crud,
.cxd-Crud2 {

  // 查询表单
  &>.cxd-Form,
  &>.cxd-Crud-filter,
  &>.cxd-Crud2-filter {
    @include query-form();

    .cxd-Grid {
      &>* {
        margin: 8px 0 !important;
      }

      .cxd-Form-item {
        margin-bottom: 5px;
      }
    }

    &+.cxd-Crud-body {
      margin-top: 15px;
      padding: 20px;
     background-color: #fff;
    }
  }

  &>.cxd-Crud2-filter {
    &+.cxd-Crud2-toolbar {
      // border: 1px solid #000;
      background: #fff;
      margin-bottom: 0;
    }
  }

  // table
  &>.cxd-Crud-body,
  &>.cxd-Table-render-wrapper>.cxd-Crud2-body {
    @include page-section();

    th {
      // background-color: white;
      color: #606266;
      font-weight: bold;
      padding-top: 12px;
      padding-bottom: 12px;
      &:first-child {
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
      }

      &:last-child {
        border-top-right-radius: 6px;
        border-bottom-right-radius: 6px;
      }
    }

    td {
      padding: 8px 8px;
      font-size: 14px;
    }

    &.cxd-Cards {
      background: transparent;
      padding: 0;

      .cxd-Cards-fixedTop {
        padding: 0;
        background: transparent;
      }

      .cxd-Cards-body {
        &>* {
          &>* {
            background: #fff;
            border-radius: 0px;
          }
        }
      }

      &>.cxd-Cards-toolbar {
        background: #fff;
        padding: 15px;
        margin-top: 15px;
        border-radius: 0px;
      }
    }
  }

  &>.cxd-Table-render-wrapper {
    &>.cxd-Crud2-body {
      margin-bottom: 0;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }

    &+.cxd-Crud2-toolbar {
      background-color: #fff;
      padding-bottom: 10px;
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
    }
  }
}

.cxd-Modal-body {
  .cxd-Table-render-wrapper {
    &>.cxd-Crud2-body {
      margin-bottom: 0;
      padding: 0;
      padding-bottom: 15px;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }

    &+.cxd-Crud2-toolbar {
      background-color: #fff;
      padding-bottom: 10px;
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
    }
  }
}

// 企业库样式
.enterprise-lib {
  &> :first-child {
    background-color: #fff;
    padding: 10px !important;
    // border: 1px solid #000;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }

  &>.cxd-Card {
    border-radius: 0;
    border: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  &>.cxd-Tabs {
    // border: 1px solid #000;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #fff;

    .cxd-Tabs-content {
      border-bottom-left-radius: 8px;
      border-bottom-right-radius: 8px;
      background-color: #fff;
    }

    .cxd-Tabs-pane {
      border-radius: 8px;
    }

    .cxd-Tabs-linksContainer-wrapper,
    .cxd-Tabs-linksContainer {
      background-color: transparent !important;
    }

    .cxd-Tabs-linksContainer-main {
      border-top-left-radius: 8px;
      border-top-right-radius: 8px;
    }

    .cxd-Tabs-links {
      background-color: #ebecfc;
      padding: 0 !important;
      border-top-left-radius: 8px;
      border-top-right-radius: 8px;

      .cxd-Tabs-link {
        padding: 18px 32px 18px 60px !important;
        margin-right: 5px !important;

        &>a {
          color: #666666 !important;
          font-size: 16px;
          font-weight: 700 !important;
          position: relative;
          overflow: visible;

          &::before {
            content: ' ';
            position: absolute;
            width: 24px;
            height: 24px;
            left: -30px;
            top: 50%;
            margin-top: -12px;
            background-repeat: no-repeat;
            background-position: center;
          }
        }

        @for $i from 1 to 8 {
          &:nth-child(#{$i}) {
            a {
              &::before {
                // background-image: url(@/assets/icons/#{$i}.svg);
              }
            }

            &:hover,
            &.is-active {
              a {
                &::before {
                  // background-image: url(@/assets/icons/#{$i}-on.svg);
                }
              }
            }
          }
        }

        &:hover {
          background-color: transparent !important;
        }

        &::after {
          content: ' ';
          display: block;
          width: 100px;
          height: 3px;
          background-color: var(--primary-color);
          position: absolute;
          bottom: 0;
          left: 50%;
          margin-left: -50px;
          transform: scaleX(0);
          transition: all 0.3s ease;
        }

        &.is-active {
          background-color: #fff !important;
          border-top-left-radius: 8px !important;
          border-top-right-radius: 8px !important;

          &>a {
            border: 1px solid #000;
          }

          &::after {
            transform: scaleX(1);
          }
        }

        &:hover>a,
        &.is-active>a {
          color: var(--primary-color) !important;
        }
      }

      // li.cxd-Tabs-link:nth-child(1) {
      // }
    }

    .cxd-Panel {
      --borderColor: #dee0e8;
      --Property-label-bg: #f3f3fc;
      border: 1px solid #dee0e8;
      border: none;
      border-radius: 8px;

      .cxd-Panel-heading {
        background-color: #fbfaff;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        padding: 20px;
        // border: 1px solid #dee0e8;
        border: 1px solid #dee0e8;
        border-bottom: 0;

        h3 {
          font-size: 16px;
          color: #3d3d3d;
          font-weight: 500;
          border-left: 3px solid var(--primary-color);
          padding-left: 10px;
          // height: 64px;
          // line-height: 64px;
        }
      }

      .cxd-Panel-body {
        padding: 0;
        margin: 0 !important;
        // border: 1px solid #dee0e8;
        .cxd-Property {
          th {
            color: #666666;
            padding: 12px 24px;
          }

          td {
            padding: 12px 16px;
          }
        }

        .cxd-Table-table {
          border: 1px solid #dee0e8;
          border-bottom: none;
        }

        &>.cxd-Form {
          &>.cxd-Form-item {
            margin-bottom: 0;

            &>.cxd-InputTable>.cxd-Table {
              margin-bottom: 0;
            }

            .cxd-InputTable-toolbar {
              border-left: 1px solid #dee0e8;
              border-right: 1px solid #dee0e8;
              padding: 10px 0 0 10px;
            }
          }
        }
      }

      .cxd-Panel-footerWrap {
        margin-top: 0 !important;
        // border: 1px solid #000;
      }

      .cxd-Panel-footer {
        border-top: none !important;
        border: 1px solid #dee0e8;
      }

      // border: 1px solid #000;
    }
  }

}
.cxd-Grid>* {
  margin: 8px !important;
}
// 伸缩框样式
.cxd-Collapse {
  .cxd-Grid>* {
    margin: 8px !important;
  }
}
.cxd-CollapseGroup{
  .cxd-Form-value{
    .cxd-Form-static{
      font-size: 14px!important;
    }
  }
}
.cxd-Collapse-header{
  background-color: #fff!important;
}
.tox-tinymce{
  min-height: 400px!important;
}
@media print {
  .cxd-Crud {
    // transform: scale(0.8);
    transform-origin: top left;
    .ae-Editor-listItem{
      page-break-before: always;
    }
  }


  body *::-webkit-scrollbar {
      display: none;
  }
  p,
  textarea,
  span,
  table,
  input {
      page-break-inside: avoid;
  }


}